package de.szut.ita13sommerfeld.apacheanalyser.libaries;

import java.util.ArrayList;

import de.szut.ita13sommerfeld.apacheanalyser.apachelog.Entry;
/**
 * 
 * @author Rene Sommerfeld
 *
 */
public class EntryLibary extends ArrayList<Entry> {
	
	private static final long serialVersionUID = 1L;
	
	private ArrayList<Integer> defectiveLines;
	private Entry firstEntry;
	private Entry lastEntry;
	
	public EntryLibary()  {
		defectiveLines = new ArrayList<Integer>();
		firstEntry = null;
		lastEntry = null;
	}

	/**
	 * 
	 * @return returns the list of defective line numbers
	 */
	public ArrayList<Integer> getDefectiveLines() {
		return defectiveLines;
	}

	/**
	 * 
	 * @param defectiveLines sets this defectivelines
	 */
	public void setDefectiveLines(ArrayList<Integer> defectiveLines) {
		this.defectiveLines = defectiveLines;
	}
	
	/**
	 * 
	 * @return returns the first entry of the libary
	 */
	public Entry getFirstEntry() {
		firstEntry = get(0);
		return firstEntry;
	}
	
	/**
	 * 
	 * @return returns the last entry of the libary
	 */
	public Entry getLastEntry() {
		lastEntry = get(size() - 1);
		return lastEntry;
	}
}
